[% page.title = 'API Method: relations exists' 
   page.tab = 'api'
%]

<h2>HEAD /:user_id/relations/:relation_id</h2>

<p>
Tests whether the specified relation exists.
Returns a 200 OK HTTP status code if the relation exists. Otherwise returns 404 Not Found.
</p>

<h3>URL:</h3>
<code>[% site.url %]/<em>user_id</em>/relations/<em>relation_id</em></code>

<h3>Formats (<a href="formats">about return formats</a>):</h3>
<p>Irrelevant because no response body is returned.</p>

<h3>HTTP Methods (<a href="http-methods">about HTTP methods</a>):</h3>
<code>HEAD</code> 

<p>Clients that can not issue <code>HEAD</code> requests can use <code>GET</code> with the added parameter <code>_method=HEAD</code></p>

<h3>Requires Authentication (<a href="authentication">about authentication</a>):</h3>
<code>true</code> &nbsp;if relation's <code>mode</code> property is set to <code>private</code><br/>
<code>false</code> &nbsp;if relation's <code>mode</code> property is set to <code>public</code>

<h3>Parameters:</h3>
<ul>
<li><code>relation_id</code>.  Required. The ID of the relation to be test for the existence of.
<ul>
<li>Example: <code>[% site.url %]/kdd09/relations/pc</code></li>
</ul>
</li>
</ul>

<h3>Usage Examples:</h3>
<blockquote>
<h4>cURL (<a href="curl">about cURL</a>):</h4>
<code>curl -I -X HEAD [% site.url %]/kdd09/relations/pc</code><br/>
</blockquote>

<h3>Response (<a href="return-values">about return values</a>):</h3>

<p>
A response header is returned with the result in the HTTP status.
No response body is returned.
</p>

